package com.nbsaas.boot.store.rest.resource;

import com.nbsaas.boot.store.api.apis.StoreCheckInRecordApi;
import com.nbsaas.boot.store.data.entity.StoreCheckInRecord;
import com.nbsaas.boot.store.api.domain.request.StoreCheckInRecordRequest;
import com.nbsaas.boot.store.api.domain.response.StoreCheckInRecordResponse;
import com.nbsaas.boot.store.api.domain.simple.StoreCheckInRecordSimple;
import com.nbsaas.boot.store.rest.convert.StoreCheckInRecordSimpleConvert;
import com.nbsaas.boot.store.rest.convert.StoreCheckInRecordEntityConvert;
import com.nbsaas.boot.store.rest.convert.StoreCheckInRecordResponseConvert;
import com.nbsaas.boot.store.data.repository.StoreCheckInRecordRepository;

import java.io.Serializable;
import com.nbsaas.boot.jpa.data.core.BaseResource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import org.springframework.data.jpa.repository.support.JpaRepositoryImplementation;

import java.util.function.Function;
/**
*   业务接口实现
*/
@Transactional
@Service
public class StoreCheckInRecordResource extends BaseResource<StoreCheckInRecord,StoreCheckInRecordResponse, StoreCheckInRecordSimple, StoreCheckInRecordRequest>  implements StoreCheckInRecordApi {

    @Resource
    private StoreCheckInRecordRepository storeCheckInRecordRepository;

    @Override
    public JpaRepositoryImplementation<StoreCheckInRecord, Serializable> getJpaRepository() {
        return storeCheckInRecordRepository;
    }

    @Override
    public Function<StoreCheckInRecord, StoreCheckInRecordSimple> getConvertSimple() {
        return new StoreCheckInRecordSimpleConvert();
    }

    @Override
    public Function<StoreCheckInRecordRequest, StoreCheckInRecord> getConvertForm() {
        return new StoreCheckInRecordEntityConvert();
    }

    @Override
    public Function<StoreCheckInRecord, StoreCheckInRecordResponse> getConvertResponse() {
        return new StoreCheckInRecordResponseConvert();
    }




}


